<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Cache-Control" content="no-siteapp">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=1, minimum-scale=1, maximum-scale=1">
<meta name="renderer" content="webkit">
<meta name="google" value="notranslate">
<meta name="robots" content="index,follow">


<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="纸小墨官方博客">
<meta name="twitter:description" content="构建只为纯粹书写的博客">
<meta name="twitter:image:src" content="http://www.chole.io/blog/images/avatar.png">

<meta property="og:url" content="http://www.chole.io/blog">
<meta property="og:title" content="纸小墨官方博客">
<meta property="og:description" content="构建只为纯粹书写的博客">
<meta property="og:site_name" content="纸小墨官方博客">
<meta property="og:image" content="http://www.chole.io/blog/images/avatar.png">
<meta property="og:type" content="website">
<meta name="robots" content="noodp">

<meta itemprop="name" content="纸小墨官方博客">
<meta itemprop="description" content="构建只为纯粹书写的博客">
<meta itemprop="image" content="http://www.chole.io/blog/images/avatar.png">

<link rel="canonical" href="http://www.chole.io/blog">

<link rel="shortcut icon" href="/favicon.png">
<link rel="apple-itouch-icon" href="/favicon.png">
<link rel="stylesheet" href="/bundle/index.css">
<script type="text/javascript">
    var timeSinceLang = {
        year: '年前',
        month: '个月前',
        day: '天前',
        hour: '小时前',
        minute: '分钟前',
        second: '秒前'
    };
    var root = '';
</script>

<script type="text/javascript">
    var conn, reloadTimer, connectTimer;
    var connect = function() {
        conn = new WebSocket('ws://' + location.host + '/live');
        conn.onmessage = function(event) {
            if (event.data === 'change') {
                if (reloadTimer) clearTimeout(reloadTimer);
                reloadTimer = setTimeout(function() {
                    window.location.reload();
                }, 200);
            }
        };
        conn.onclose = function() {
            if (connectTimer) clearTimeout(connectTimer);
            connectTimer = setTimeout(function() {
                connect();
            }, 1000);
        };
    };
    connect();
</script>


        <meta name="keywords" content="设计,写作,">
        <meta name="description" content="An Elegant Static Blog Generator —— InkPaper">
        <meta name="author" content="纸小墨">
        <title>An Elegant Static Blog Generator —— InkPaper</title>
    </head>
    <body>
        <article class="container">
            <header class="header-wrap">
  <a class="index" href="/">
    <img class="logo" src="/images/avatar.png" />
    纸小墨官方博客
  </a>
  <ul class="menu">
      <li class="menu-item"><a href="/archive.html">归档</a></li>
      <li class="menu-item"><a href="/tag.html">标签</a></li>
      <li class="menu-item"><a href="/atom.xml">订阅</a></li>
  </ul>
</header>

            <article class="main article">
                <h1 class="title">An Elegant Static Blog Generator —— InkPaper</h1>
                <section class="info">
                    <span class="avatar" style="background-image: url(/images/avatar.png);"></span>
                    <a class="name" href="/about.me.html">纸小墨</a>
                    
                    <span class="date" data-time="1468227600"><span class="from"></span></span>
                    
                    <span class="tags"><a class="tag" href="/tag/%e8%ae%be%e8%ae%a1/index.html">设计</a><a class="tag" href="/tag/%e5%86%99%e4%bd%9c/index.html">写作</a></span>
                </section>
                <article class="content"><h2>Introduce</h2>

<p>InkPaper is an static blog generator developed by Golang, No dependencies, Cross platform, Easy use, Fast build, Elegant theme.</p>

<p><img src="" data-src="/images/example-en.png" alt="InkPaper - An Elegant Static Blog Generator" /></p>

<h3>Quick Start</h3>

<ul>
<li>Download &amp; Extract <a href="http://www.chole.io/">Ink</a>，Run <code>ink preview</code></li>
</ul>

<blockquote>
<p>Tips：Linux/macOS, use <code>./ink preview</code></p>
</blockquote>

<ul>
<li>Open <code>http://localhost:8000</code> in browser to preview</li>
</ul>

<h3>Website Configuration</h3>

<p>Edit <code>config.yml</code>, use format:</p>

<pre><code class="language-yaml">site:
    title: Website Title
    subtitle: Website Subtitle
    limit: Max Article Count Per Page
    theme: Website Theme Directory
    comment: Comment Plugin Variable (Default is disqus username)
    root: Website Root Path #Optional
    lang: Website Language #Support en, zh, ru, ja, Configurable in theme/lang.yml
    url: Website URL #For RSS Generating
    link: Article Link Scheme #Default Is {title}.html，Support {year},{month},{day},{title} Variables

authors:
    AuthorID:
        name: Author Name
        intro: Author Motto
        avatar: Author Avatar Path

build:
    output: Build Output Directory #Optional, Default is &quot;public&quot;
    port: Preview Port
    copy:
        - Copied Files When Build
    publish: |
        Excuted command when use 'ink publish'
</code></pre>

<h3>Writing</h3>

<p>Create any <code>.md</code> file in <code>source</code> directory (Support subdirectory), use format:</p>

<pre><code class="language-yaml">title: Article Title
date: Year-Month-Day Hour:Minute:Second #Created Time，Support TimeZone, such as &quot; +0800&quot;
update: Year-Month-Day Hour:Minute:Second #Updated Time，Optional，Support TimeZone, such as &quot; +0800&quot;
author: AuthorID
cover: Article Cover Path #Optional
draft: false #If Draft，Optional
top: false #Place article to top, Optional
preview: Article Preview，Also use &lt;!--more--&gt; to split in body #Optional
tags: #Optional
    - Tag1
    - Tag2
type: post #Specify type is post or page, Optional
hide: false #Hide article，can be accessed via URL, Optional

---

Markdown Format's Body
</code></pre>

<h3>Publish</h3>

<ul>
<li>Run <code>ink publish</code> in blog directory to automatically build and publish</li>
<li>Or run <code>ink build</code> to manually deploy generated <code>public</code> directory</li>
</ul>

<blockquote>
<p><strong>Tips</strong>: When files changed，<code>ink preview</code> will automatically rebuild blog，refresh browser to update.</p>
</blockquote>

<h2>Customization</h2>

<h3>Modify Theme</h3>

<p>Default theme placed in <code>theme</code> folder, run <code>npm install</code> and <code>npm run build</code> to rebuild in this folder.</p>

<p>page <code>page.html</code> (article list) and <code>article.html</code> (article), use variable with <a href="http://golang.org/pkg/html/template/">Golang Template</a> syntax.</p>

<h3>New Page</h3>

<p>Created any <code>.html</code> file will be copied to <code>source</code> directory, could use all variables on <code>site</code> field in <code>config.yml</code>.</p>

<h3>Blog Migrate (Beta)</h3>

<p>Support simple Jeklly/Hexo post convert, use:</p>

<pre><code class="language-shell">ink convert /path/_posts
</code></pre>

<h3>Build from source</h3>

<p>Local Build</p>

<ol>
<li>Install <a href="http://golang.org/doc/install">Golang</a> environment</li>
<li>Run <code>go get github.com/InkProject/ink</code>, compile and get ink</li>
<li>Run <code>ink preview $GOPATH/src/github.com/InkProject/ink/template</code>, preview blog</li>
</ol>

<p>Docker Build (Example)</p>

<ol>
<li>Clone code <code>git clone git@github.com:InkProject/ink.git</code></li>
<li>Build image <code>docker build -t ink .</code> in source directory</li>
<li>Run container <code>docker run -p 8888:80 ink</code></li>
</ol>

<h2>Theme</h2>

<ul>
<li>Dark(Official Theme): <a href="https://github.com/InkProject/ink-theme-dark">https://github.com/InkProject/ink-theme-dark</a></li>
<li>simple: <a href="https://github.com/myiq/ink-simple">https://github.com/myiq/ink-simple</a></li>
</ul>

<h2>Related Toturials</h2>

<ul>
<li><a href="http://www.shery.me/blog/travis-ci.html">Automatically deploy your Ink blog to GitHub pages wiht Travis CI</a></li>
</ul>

<h2>Issue Report</h2>

<p><a href="https://creativecommons.org/licenses/by-nc/4.0/">CC Attribution-NonCommercial License 4.0</a></p>

<p><a href="https://github.com/InkProject/ink/issues">https://github.com/InkProject/ink/issues</a></p>

<h2>Change Log</h2>

<ul>
<li>[2016-07-11] Fix bugs and merge many PRs</li>
<li>[2015-08-15] Bug fix, support RSS feed, improve theme</li>
<li>[2015-07-04] Bug fix, improve theme, support top, i18n, subtemplate</li>
<li>[2015-06-04] Build more platform, add archive and tag page</li>
<li>[2015-03-01] Release first beta version</li>
</ul>

<h2>Develop Plan</h2>

<ul>
<li>Improve Theme</li>
<li>InkPaper Editor</li>
</ul>

<h2>They are using</h2>

<ul>
<li><a href="http://www.chole.io/blog/">http://www.chole.io/blog/</a></li>
<li><a href="http://blog.hyper.sh/">http://blog.hyper.sh/</a></li>
<li><a href="http://wangxu.me/">http://wangxu.me/</a></li>
<li><a href="http://whzecomjm.com/">http://whzecomjm.com/</a></li>
<li><a href="http://www.shery.me/blog/">http://www.shery.me/blog/</a></li>
</ul>
</article>
                <section class="author">
                    <div class="avatar" style="background-image: url(/images/avatar.png);"></div>
                    <a class="name" href="/about.me.html">纸小墨</a>
                    <div class="intro">构建只为纯粹书写的博客</div>
                </section>
                <section class="recommend">
                    
                    <section class="nav prev">
                        <div class="head">上篇文章</div>
                        <a class="link" href="/ink-blog-tool.html">简洁的静态博客构建工具 —— 纸小墨（InkPaper）</a>
                    </section>
                    
                    
                </section>
                
    <section id="disqus_thread"></section>
    <script type="text/javascript">
        (function() {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//username.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>


            </article>
        </article>
        <footer class="footer">
    <span class="copyright">
        纸小墨官方博客 ©
        <script type="text/javascript">
            document.write(new Date().getFullYear());
        </script>
    </span>
    <span class="publish">Powered by <a href="http://www.chole.io/" target="_blank">Ink</a></span>
</footer>

        <script src="/bundle/index.js"></script>
    </body>
</html>
